Read Catalogue
First, everything is a string
Two, references and metacharacters
Three, where does the string come from, where to go
Four, plus a little bit of definition, you can push to export the entire Bash scripting language
I confess that I once again became the title party. But admittedly, this must be an essential essay. In this article, I'll explore the aesthetics and philosophy of the Bash scripting language. This is not a tutorial for bash scripting, but it gives
I confess that I once again became the title party. But admittedly, this must be an essential essay. In this article, I'll explore the aesthetics and philosophy of the Bash scripting language. This is not a tutorial for bash scripting, but it gives
1. What is shell?
In fact, I have heard of shell before I came into contact with Linux. At that time, I was talking about shell programming and I knew nothing about it. But surprisingly, I remember this term when my memory is really bad. Okay,
Ix. unfoldingThe expansion of the command line is done after splitting the word into words. There are seven types of expansion: curly brace expansion, wavy line expansion, parametric and variable expansion, command substitution, arithmetic expansion,
Bash programming arrays and string handlingDirectoryNote Date 20180405ArrayFame (Create) array declare-a array_nameAssignment of array elements array_name= ("VAL1" "VAL2" "VAL3" ...)Referencing an array element: ${array_name[index]}Bash's string
Xi. functionsThe shell function is defined by the description of the shell grammar above and holds a series of commands waiting to be executed later. When the shell function name is used as a simple command name, a series of commands associated with
5.2 Bash Variables
The following variables are set or used in Bash. Other shells generally do not process these variables.
Some variables used by Bash are also described in other chapters: for example, for variables used by tools for controlling
The technical skills here were originally from Google's "testing on the Toilet" (Tott). Here is a revised and amplified version. Script Security
All of my bash scripts start with the following lines:
#!/bin/bash
set-o nounset
set-o
Bash array, bashBash only supports one-dimensional arrays. And the array subscript starts from 0.Assign values to Arrays:Array = (1 4 7 2 5 8) # use space as the delimiter and () as the arrayStr = "this is test string"Str_arr = ($ str); # separated
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.